{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 编辑蓝图EnemyCharacter\n",
    "添加组件 pawn sensing\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0009_1.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 调整参数\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0009_2.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# see pawn\n",
    "选择组件pawn sensing，确认选中了SeePawns\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0009_3.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 调整视角"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 选中PawnSensing，点击事件On See Pawn\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0009_5.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 建立一个黑板的值Player，代表玩家，\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0009_6.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## BaseClass选Actor\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0009_6_1.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 行为树，添加Sequence，命名为AttackPlayer\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0009_7.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 新建任务，命名为：ResetPlayer\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0009_8.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 将任务ResetPlayer加入行为树\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0009_9.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 编辑任务ResetPlayer\n",
    "    添加事件：Receive Execute\n",
    "    添加：Set BlackBoard Value\n",
    "    添加：Finish Execute\n",
    "    添加变量：key ，类型：Blackboard Key\n",
    "    添加变量：value，类型：Object\n",
    "\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0009_10.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 变量key和vlaue设为公有！\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0009_10_1.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 指定变量key，value\n",
    "编辑行为树，选中任务ResetPlayer，指定变量key为Player，value为无\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0009_11.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 添加装饰器\n",
    "编辑行为树，右键AttackPlayer节点，添加装饰器blackboard，取名：Seen Player\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0009_12.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 设置装饰器\n",
    "    Blackboard Key选择Player\n",
    "    观察者终止选Lower priority\n",
    "\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0009_12_1.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 本体给黑板赋值\n",
    "\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0009_13.png)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
